
#绝对值
def mine_abs(num):
    if not isinstance(num,(int,float)):
        return 'Type Error! Please Check it!'
    if num>=0:
        return num
    else:
        return -num

#加减值
def mine_plusRedu(x,y):
    if not isinstance(x,(int,float)):
        return 'X Type Error! Please Check it!'
    if not isinstance(y, (int, float)):
        return 'Y Type Error! Please Check it!'
    return x+y,x*y

#递归 n!
def fact(n):
    if n==1:
        return 1
    return n*fact(n-1)

#尾递归 n! return 本身 不包含表达式
def a_fact(n,p):
    if n==1:
        return p
    return a_fact(n-1,n*p)